// function btn_color(elmnt) {
// 	elmnt.style.backgroundColor = "#385AEB";
// 	elmnt.style.color = "#ffffff";
// }


// function search_btn_color(elmnt) {
// 	elmnt.style.backgroundColor = "rgba(253, 57, 122, 1)";
// 	elmnt.style.color = "#ffffff";
// }

$(function() {
	// 页面加载时控制台输出
	console.log("%c ",
		"background:url(https://v2.jinrishici.com/one.svg) no-repeat;padding:50px 300px;line-height:1px");
	console.log("%c ",
		"background:url(http://yaokui.ltd:9000/ip?s=【5LiJ5bKB5b2x6KeG】) no-repeat;padding:50px 300px;line-height:120px"
		);
	// 点击搜索按钮进行输入框非空校验

	
	//检测网页不在当前页面是修改标题
	var Titile = document.title;
	var str;
	document.addEventListener('visibilitychange', function() {
	    if (document.hidden) {
	        document.title = '页面已崩溃！点击恢复！ - ' + Titile;  //后台显示时的标题
	        clearTimeout(str);
	    } else {
	        document.title = '(/≧▽≦/)咦！又好了！ - ' + Titile;  //前台显示时的标题
	        str = setTimeout(function() {
	            document.title = Titile;
	        }, 2000);
	    }
	});

});


	
	function islayer(laye){
		
		var lay = laye
		if (lay) {
			//示范一个公告层
			layer.open({
				type: 1,
				title: "三岁影视 v1.0" //为false不显示标题栏,显示的话改为标题内容
					,
				closeBtn: false,
				area: '300px;',
				shade: 0.8,
				id: 'LAY_layuipro' //设定一个id，防止重复弹出
					,
				resize: false,
				btn: ['火速围观', '残忍拒绝'],
				btnAlign: 'c',
				moveType: 1 //拖拽模式，0或者1
					,
				content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">三岁影视，一款纯html实现的影视网站<br>by 三岁</div>',
				success: function(layero) {
					var btn = layero.find('.layui-layer-btn');
					btn.find('.layui-layer-btn0').attr({
						href: './index.html',
						target: '_blank'
					});
				}
			});
		}
		
	}
